Skip to content

Release: CLI path guard, wheel-built container images, new-code cleanup#462

Merged
JE-Chen merged 4 commits into
mainfrom
dev
Jul 23, 2026
Merged

Release: CLI path guard, wheel-built container images, new-code cleanup#462
JE-Chen merged 4 commits into
mainfrom
dev

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jul 23, 2026

Copy link
Copy Markdown
Member

Ships #461 to main, which is where the branch quality gate went red after the previous release.

  • utils/path_guard/: operator-supplied CLI paths are canonicalised with os.path.realpath and bounded to the working directory, home or temp dir (AUTOCONTROL_ALLOWED_PATH_ROOTS extends it). Wired into stubs.generator, config_bundle and turn_config.
  • Container images build every wheel in a throwaway stage; the runtime installs with --only-binary :all: --no-index, so nothing new can be pulled there.
  • Determinism assertions no longer compare an expression with itself, the total_record scripts no longer hide an assert inside a handler that catches AssertionError, and the file / language / token inputs get real label for= associations.

JE-Chen added 4 commits July 23, 2026 11:12
Merging the release exposed a batch of SonarCloud findings that the PR
gates never saw, because a PR only rates its own diff.

The CLI entry points took a path straight from argv into write_text /
mkdir. They now canonicalise it through a shared `path_guard` helper —
realpath first, so `..` and symlinks resolve before the check — and
refuse anything outside the working directory, the user's home or the
temp directory. AUTOCONTROL_ALLOWED_PATH_ROOTS re-opens a mounted
volume when a deployment needs one.

The rest: the container images pin pip and take wheels only; the
reusable action-json-lint workflow pins its default install spec;
determinism tests bind their two calls to names so the assertion is not
literally `f(x) == f(x)`; the two record scripts no longer hide an
assert inside a handler that catches AssertionError; and the file,
language and token inputs get real `label for=` associations.
The runtime layer resolved and built its dependencies straight from PyPI,
so a rebuild could pick up a different set and any sdist in the graph got
to run its setup script inside the image. A throwaway builder stage now
produces every wheel, and the runtime installs with --only-binary and
--no-index against that directory — nothing new can be fetched there.

Drop the two suppressions that turned out to be inert: NOSONAR is not
honoured inside a Dockerfile or a `run: |` block, so they were noise.
…de-cleanup

Bound CLI paths and clear the new-code findings on main
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
E Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 29 complexity · 0 duplication

Metric Results
Complexity 29
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@JE-Chen
JE-Chen merged commit e18711c into main Jul 23, 2026
46 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant